bitkeeper revision 1.1108.33.18 (410aa47ebwOvb3mWKrhu5YMJbZixSg)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Fri, 30 Jul 2004 19:41:50 +0000 (19:41 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Fri, 30 Jul 2004 19:41:50 +0000 (19:41 +0000)
only allow IOCTL_PRIVCMD_MMAP* for privileged guests since the
direct_map calls only exist in privileged guests

linux-2.6.7-xen-sparse/drivers/xen/privcmd/privcmd.c
linux-2.6.7-xen-sparse/include/asm-xen/asm-i386/pgalloc.h

index 3275dd015f25edbe4c02dd6608e804bb5fed275e..8abc2331fe9b99421a78c1445115da803b609af2 100644 (file)
@@ -67,7 +67,7 @@ static int privcmd_ioctl(struct inode *inode, struct file *file,
     }
     break;
     
-
+#if defined(CONFIG_XEN_PRIVILEGED_GUEST)
     case IOCTL_PRIVCMD_MMAP:
     {
 #define PRIVCMD_MMAP_SZ 32
@@ -179,6 +179,7 @@ static int privcmd_ioctl(struct inode *inode, struct file *file,
         break;
     }
     break;
+#endif
 
     default:
         ret = -EINVAL;
index f27a7aadcf1a7c761b5d2fb9218acf8c8d683dc6..c9cc3446790999ae1582db8a01722f945b4128fb 100644 (file)
@@ -56,6 +56,7 @@ static inline void pte_free(struct page *pte)
 
 #define check_pgt_cache()      do { } while (0)
 
+#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 int direct_remap_area_pages(struct mm_struct *mm,
                             unsigned long address, 
                             unsigned long machine_addr,
@@ -66,5 +67,6 @@ int __direct_remap_area_pages(struct mm_struct *mm,
                              unsigned long address, 
                              unsigned long size, 
                              mmu_update_t *v);
+#endif /* CONFIG_XEN_PRIVILEGED_GUEST */
 
 #endif /* _I386_PGALLOC_H */